package jvm;


class CodeZY{
    public CodeZY(){
        System.out.println("code的构造方法1111");
    }

    {
        System.out.println("code的构造块2222");
    }

    static {
        System.out.println("code的静态代码块3333");
    }
}

/**
 * 加载代码练习
 */
public class CodeBlock {
    {
        System.out.println("codeblock的构造块4444");
    }

    static {
        System.out.println("codeblock的静态代码块5555");
    }

    public CodeBlock(){
        System.out.println("codeblock的构造方法6666");
    }

    public static void main(String args[]){
        System.out.println("--------------codeblock的main方法7777");
        new CodeZY();
        System.out.println("------------------");
        new CodeZY();
        System.out.println("------------------");
        new CodeBlock();
    }

}
